fix: add use strict and use warnings to Makefile.PL#264
Draft
fix: add use strict and use warnings to Makefile.PL#264
Conversation
Both Makefile.PL and Expat/Makefile.PL lacked strict and warnings pragmas. The top-level Makefile.PL also used bare package globals ($expat_libpath, $expat_incpath) instead of lexical variables. - Add 'use strict' and 'use warnings' to both files - Convert package globals to lexical (my) variables in Makefile.PL (Expat/Makefile.PL already used 'my') Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
=======================================
Coverage 75.73% 75.73%
=======================================
Files 1 1
Lines 1092 1092
Branches 342 342
=======================================
Hits 827 827
Misses 59 59
Partials 206 206
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
use strictanduse warningsto bothMakefile.PLandExpat/Makefile.PL.Why
These are the only Perl files in the distribution still missing strict/warnings. The top-level
Makefile.PLused bare package globals ($expat_libpath,$expat_incpath) — declaring them as lexicals catches typos and scoping issues at compile time.How
use strict; use warnings;to both files$expat_libpath/$expat_incpathfrom bare globals tomyvariables in the top-levelMakefile.PL(Expat/Makefile.PL already usedmy)Testing
perl Makefile.PLsucceeds (both levels)make test— all tests passmake disttest— verified separately🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 6 insertions(+), 2 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline